-- GENERATED SPELL FOR [Draconic Mageweaver] --


function spell0_6131(pUnit, Event) --@Cone of Cold,Self--
pUnit:FullCastSpellOnTarget(12557,pUnit)
pUnit:RegisterEvent('Sorts_6131', 8291, 1)
end

function spell1_6131(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(9672,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_6131', 7000, 1)
end

function Sorts_6131(pUnit, Event)
local choix_sorts_6131 = math.random(0, 1)
if choix_sorts_6131 == 0 then
pUnit:RegisterEvent('spell0_6131', 1, 1)
end
if choix_sorts_6131 == 1 then
pUnit:RegisterEvent('spell1_6131', 1, 1)
end
end

function mob6131_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_6131', math.random(1500, 3000), 1)
end

function mob6131_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob6131_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob6131_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(6131, 1, 'mob6131_Action')
RegisterUnitEvent(6131, 2, 'mob6131_Leave')
RegisterUnitEvent(6131, 3, 'mob6131_Kill')
RegisterUnitEvent(6131, 4, 'mob6131_Die')
